import requests

# url
base_url = "https://www.hbjcxy.com"
# 使用get请求
response = requests.get(base_url)
# 设置编码方式
response.encoding = "utf-8"
# 输出内容
print(response.text)
# 写入文件
with open("建材.html","w+",encoding="utf-8") as f:
    f.write(response.text)
# 读文件
with open("abc.txt","r+",encoding="utf=8") as f:
    d = f.readlines()
    print(d)